package com.wechat.admin.model.vo;

import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Author:sjb
 * @CreateTime:2024-12-15
 * @Description: 用户和设备信息视图
 * @Version：1.0
 */
@Data
public class UserAndDeviceVo implements Serializable {

    private long total;
    private int currentPage;
    private int pageSize;
    // 当前页的数据列表
    private List<UserDeviceInfo> records;

    @Data
    public static class UserDeviceInfo {
        private Long userId;
        private String username;
        private String role;
        private Integer userGroup;
        private String groupName;
        // 用户绑定的设备信息列表
        private List<DeviceInfo> devices;
    }

    @Data
    public static class DeviceInfo {
        // 设备ID
        private String deviceId;
        // 设备名称
        private String deviceName;
        // 设备状态（如：启用/禁用）
        private Integer status;
        // 设备加入时间
        private Date joinedAt;
        /**
         * 登录设备时申请的token
         */
        private String description;
        private String token;
        private Date loginTime;
    }

    private static final long serialVersionUID = 1L;
}
